package juc_13_stream;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class Demo02 {

    public static void main(String[] args) {
        List<Object[]> splitUpNames = Arrays.asList("John Woo", "Jeff Dean", "Josh Bloch", "Josh Long").stream()
                .map(name -> name.split(" "))
                .collect(Collectors.toList());

        splitUpNames.forEach(objects -> {
            System.out.println(objects[0] + " " + objects[1]);
        });
    }
}
